<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"   
      xmlns:ui="http://java.sun.com/jsf/facelets"

      xmlns:h="http://java.sun.com/jsf/html">
    <body>
        <ui:composition>
            <h:panelGroup  rendered="#{userController.loggedIn}"> 
                You're logged in as #{userController.user.firstname} (#{userController.user.role.name}).
                <br/>
                <h:form>
                    <h:commandLink action="#{userController.logout()}">Log out</h:commandLink>
                </h:form>
            </h:panelGroup>

            <h:panelGroup rendered="#{!userController.loggedIn}"> 
                You are not logged in!
                <br/>
                <h:link outcome="pretty:login">Log in</h:link>
            </h:panelGroup>

        </ui:composition>
    </body>
</html>